<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head>
	<th:block th:include="include :: header('订单发货')" />
</head>

<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-order-delivery">
			<input type="hidden" name="orderId" th:value="${orderId}">
			<div class="row">
				<div class="col-sm-12">
					<div class="ibox-content">
						<div class="row ">
							<div class="col-sm-10 col-sm-offset-1 alert alert-info">
								<address>
									<strong>收件人：[[${order.contact}]]</strong>
									<br>
									联系电话：[[${order.mobile}]]
									<br>
									所在县区：[[${order.provinceName}]] [[${order.cityName}]] [[${order.districtName}]]
									<br>
									详细地址：[[${order.address}]]
								</address>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="form-group">
					<label class="col-sm-3 control-label">配送类型：</label>
					<div class="col-sm-8">
						<label class="radio-box">
							<input type="radio" name="deliveryType" value="0" checked="checked" />物流快递
						</label>
						<label class="radio-box">
							<input type="radio" name="deliveryType" value="3" />虚拟商品
						</label>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="form-group">
					<label class="col-sm-3 control-label is-required">物流公司：</label>
					<div class="col-sm-8">
						<select name="expressId" class="form-control">
							<option th:each="express: ${expresses}" th:text="${express.expressName}"
								th:value="${express.expressId}"></option>
						</select>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="form-group">
					<label class="col-sm-3 control-label is-required">物流单号：</label>
					<div class="col-sm-8">
						<input name="deliveryNo" class="form-control" type="text" required>
					</div>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="include :: footer" />
	<script th:inline="javascript">
		var prefix = ctx + "shop/trade/order"
		$("#form-order-delivery").validate({
			focusCleanup: true
		});

		function submitHandler() {
			if ($.validate.form()) {
				$.operate.save(prefix + "/delivery", $('#form-order-delivery').serialize());
			}
		}
	</script>
</body>

</html>